import { http } from '@/utils/http'
import type { LoginData, LoginStoreResult,LoginUserPwd, LoginDataResult } from '@/types/login'

export const login = (data: LoginUserPwd ) => {
  return http<LoginDataResult[]>({
    method: 'POST',
    url: '/system/auth/miniLogin',
    data
  })
}

export const getInfo = () => {
    return http<LoginDataResult>({
    method: 'GET',
    url: '/system/auth/get-mini-info'
  })
}

/**
 */
export const SendUserInfoToServer = (data: LoginData ) => {
  return http<LoginStoreResult[]>({
    method: 'POST',
    url: '/system/auth/miniLogin',
    data
  })
}


export const test2 = (data: LoginData ) => {
  return http<LoginData[]>({
    method: 'POST',
    url: '/member/auth/test2',
    data
  })
}